﻿using Castle.Windsor;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WJP.Dependency
{
    /// <summary>
    /// 这个接口用于直接执行依赖性注入任务。
    /// </summary>
    public interface IIocManager : IIocRegistrar, IIocResolver, IDisposable
    {
        /// <summary>
        /// Castle Windsor Container容器的引用
        /// </summary>
        IWindsorContainer IocContainer { get; }

        /// <summary>
        /// 检查类型是否已注册到IOC容器
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        new bool IsRegistered(Type type);

        /// <summary>
        /// 检查类型是否已注册到IOC容器
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <returns></returns>
        new bool IsRegistered<T>();
    }
}
